let pageVariables = remote.getGlobal('pageVariables');

function goto(fragment, title) {
	if (title) {
		pageVariables.title = title;
	} else {
		pageVariables.title = '';
	}
	let content = document.getElementById('page-content');
	if (content.hasChildNodes()) {
		let children = content.children;
		for (let i = 0; i < children.length; i++) {
			let child = children[i];
			if (child.id === fragment) {
				child.classList.remove('hidden');
			} else {
				child.classList.add('hidden');
			}
		}
	}
}
